import { Column } from 'typeorm'

export default class RequestErrorInfo {
  @Column('string', { nullable: true, default: null, comment: '错误名称' })
  name?: string

  @Column('string', { nullable: true, default: null, comment: '错误信息' })
  message?: string

  @Column('array', { comment: '错误堆栈信息', nullable: true })
  stacks?: string[]

  constructor(name?: string, message?: string, stacks?: string[]) {
    this.name = name
    this.message = message
    this.stacks = stacks
  }
}
